const initState = {
  // 列表数据
  list: [],
  // 筛选参数
  params: {
    title: '',
    count: ''
  }
}

const listReducer = (state = initState, action) => {
  const { type, payload } = action
  if(type === 'setList') {
    return {
      ...state,
      list: payload
    }
  }  

  if(type === 'setParams') {
    return {
      ...state,
      params: payload
    }
  }  


  return state;
}

export default listReducer